import request from '@/utils/request';
import { parseStrEmpty } from '@/utils/ruoyi';

// 查询顾客标签列表
export function listCustomerTag(query) {
  return request({
    url: '/customer/tag/list',
    method: 'get',
    params: query,
  });
}

// 获取顾客标签详情
export function getCustomerTag(tagId) {
  return request({
    url: '/customer/tag/' + parseStrEmpty(tagId),
    method: 'get',
  });
}

// 新增顾客标签
export function addCustomerTag(data) {
  return request({
    url: '/customer/tag',
    method: 'post',
    data: data,
  });
}

// 修改顾客标签
export function updateCustomerTag(data) {
  return request({
    url: '/customer/tag',
    method: 'put',
    data: data,
  });
}

// 删除顾客标签
export function deleteCustomerTagById(tagId) {
  return request({
    url: '/customer/tag/' + tagId,
    method: 'delete',
  });
}

// 批量删除顾客标签
export function batchDeleteCustomertag(tagIds) {
  return request({
    url: '/customer/tag',
    method: 'delete',
    data: tagIds,
  });
}
